<%--
    Created by IntelliJ IDEA.
    User: Re
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>查看商品</title>
</head>
<body>
<form action="/checkCommodity" method="post">
    <table border="1">
        <tr>
            <th>商品名</th>
            <th>商品种类</th>
            <th>商品价格</th>
            <th>删除商品</th>
            <th>更改商品信息</th>
        </tr>
        <c:forEach items="${listMsg}" var="commodities">
            <tr>
                <td>${commodities.commodityName}</td>
                <td>${commodities.commodityKind}</td>
                <td>${commodities.commodityPrice}</td>
                <td><input type="checkbox" name="deleteCommodityById" value="${commodities.commodityId}"></td>
                <td><button type="submit" name="updateCommodityById" value="${commodities.commodityId}">更改</button></td>
            </tr>
        </c:forEach>
    </table>
    <button type="submit" name="check" value="deleteCommodity">删除商品</button>
    <button type="submit" name="check" value="addCommodity">添加商品</button>
    <button type="submit" name="userId" value="${user.userId}">查看商品信息</button><br>
    <span style="color: red;font-size: 15px">${msg}</span>
</form>
</body>
</html>
